/**
 * 
 */
package scriptrunner.execution;

import java.io.Serializable;

/**
 * @author Administrator
 * 
 */
public class MainFunction extends Function implements Serializable {

	public MainFunction(StatementList sl) {
		super(new String(), new ParameterList());
		this.sl = sl;
		FunctionRegister.GetInstance().SetMainFunction(this);
	}

	@Override
	public ValueObject Execute(Session se) throws ExecuteErrorException {
		sl.Execute(se);
		return se.getReturnResult();
	}

	StatementList sl;
}
